From 0b0920b0443b656553f82711299ba83d073a3670 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 15 Mar 2005 20:14:09 +0000 Subject: [PATCH] Demote alt to an int before use for endian safety. --- lowranceusr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lowranceusr.c b/lowranceusr.c index 2005670f6..cd996007e 100644 --- a/lowranceusr.c +++ b/lowranceusr.c @@ -285,6 +285,7 @@ lowranceusr_waypt_pr(const waypoint *wpt) short int WayptType; char *name; char *comment; + int alt = wpt->altitude; /* our personal waypoint counter */ my_fwrite2(&waypt_out_count, file_out); @@ -294,7 +295,7 @@ lowranceusr_waypt_pr(const waypoint *wpt) my_fwrite4(&Lat, file_out); Lon = lon_deg_to_mm(wpt->longitude); my_fwrite4(&Lon, file_out); - my_fwrite4(&wpt->altitude, file_out); + my_fwrite4(&alt, file_out); /* Try and make sure we have a name */ if ((! wpt->shortname) || global_opts.synthesize_shortnames) { -- 2.30.2